<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/include/includeHeader.jsp"%>
<%@ page import="java.util.*,
                 com.kylin.common.util.*,
                 com.kylin.hibernate.*,
                 com.kylin.module.ad.orm.*" %>
<%@ include file="/common/include/taglibs.jsp"%>
	新增广告

<br><mytag:MyActionMsg />
<html:form action="/admin/ad/manageAD.do" method="post" enctype="multipart/form-data">
<input type="hidden" name="CMD" value="addAD">
<table width="400"  cellspacing="0" cellpadding="0">
    <tr><td align="left" width="100">广告类型</td>
        <td>
		<select name="adtype">
		<option value=""></option>
<% 
        List list=BaseHibernateDAO.findAll(ADType.class,null);
        if(list != null)
        	for(int i=0;i<list.size();i++){
        	    ADType adtype=(ADType)list.get(i);
%>
			<option value="<%=adtype.getId() %>" 
			  <%if((adtype.getId()+"").equals(request.getParameter("adtype")) )
			  out.print("selected"); %>><%=adtype.getName() %></option>
<%
        	    
        	}
%>        
		</select>
		</td>
    </tr>
    <tr><td align="left" width="100">广告名称</td>
        <td><html:text property="name"/></td>
    </tr>
    <tr><td align="left" >广告所属人</td>
        <td><html:text property="owner"/></td>
    </tr>
    <tr><td align="left" >投放语言版本</td>
        <td><mytag:national name="language" notEmpty="true"
				dictName="<%=Constants.SYSLANGUAGE%>" />
		</td>
    </tr>
    <tr><td align="left" >链接</td>
         <td><html:text property="link"/></td>
    </tr>
    <tr><td align="left" >到期时间</td>
         <td>
			<mytag:CalendarInput name="endtime" id="endtimeId" 
				imgId="endtime_img" size="10"/>
         </td>
    </tr>
    <tr><td align="left" >说明文字</td>
        <td><html:text property="memo"  /></td>
    </tr>
    <tr><td align="left">排序号  &nbsp;</td>
      <td ><input type="text" name="ordering" value="100"></td>
    </tr>
    <tr><td align="left">上传媒体文件  &nbsp;</td>
      <td ><input type="file" name="file" value="100"></td>
    </tr>
    <tr><td colspan=2 align=center><input type="submit" value="保存"></td></tr>
</table>    
</html:form>
